<?PHP
$id = $_GET['id_user'];

include_once "ini.php";
dbconnect();
$json = array();
$i=0;
$sql = "SELECT * FROM images WHERE id_user = '".$id."' ORDER BY id_image";
$requete = mysql_query($sql);
if (!$requete)
{
    echo "SQL error : ", $sql;
    exit ;
}
else
{
	while($tab = mysql_fetch_assoc($requete))
	{
		$json[$i] = $tab;
		$i++;
	}
}
echo json_encode($json);
dbclose();

?>